<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>vue1.0</h1>
    <div id="app">
      <h2>{{ count }}</h2>
      <input type="text" v-model="count">
    </div>
    <script type="module">
      import Vue from "./src/core/index.js";
      const vue = new Vue({
        el: "#app",
        data() {
          return {
            // 响应式数据
            count: 1,
            arr: []
          };
        },
        methods: {
          handAdd() {
            this.count++;
          }
        },
        computed: {
          countPlus() {
            return this.count * 2
          }
        },
        watch: {}
      });
      // setTimeout(() => {
      //   // vue._data.count++
      //   console.log(vue._data.count);
      //   vue._data.arr.push(1)
      //   console.log(vue._data)
      // }, 1000);
      // setTimeout(() => {
      //   vue._data.count += 1;
      // }, 2000);
    </script>
  </body>
</html>
